Skip to content

[Added] support for FullName, FirstName, LastName, and UserName for Mattermost bridge#194

Open
AlexanderShK wants to merge 11 commits intomatterbridge-org:masterfrom
AlexanderShK:master
Open

[Added] support for FullName, FirstName, LastName, and UserName for Mattermost bridge#194
AlexanderShK wants to merge 11 commits intomatterbridge-org:masterfrom
AlexanderShK:master

Conversation

@AlexanderShK
Copy link
Copy Markdown

This is my patch, rebased on top of your fork that added support for FullName, FirstName, LastName, and UserName (instead of only Nickname and FirstName).
For it to work, you will also need to apply the corresponding changes to matterclient (https://github.com/AlexanderShK/matterclient). I left the module link and checksum in go.sum and go.mod unchanged in the public repository (they would need to be updated for your fork anyway), but the patch itself is fully available and ready.

update variables
added UseFullName and UseLastName for Mattermost
Add ability to use FullName, FirstName, LastName, NickName or UserName(if neither is set) as nick for Mattermost
Added examples NickName/FullName/FirstName/LastName/UserName for Mattermost
@poVoq
Copy link
Copy Markdown
Collaborator

poVoq commented Mar 23, 2026

Hmm, since Matterclient is a first party library by the original Matterbridge dev, does this mean you are willing to maintain this library as a fork from now on?

@AlexanderShK
Copy link
Copy Markdown
Author

Idk, to be honest, I'm not sure I have enough skills for this. After all, I've never been a maintainer before.

@AlexanderShK
Copy link
Copy Markdown
Author

Hypothetically speaking, I think I could give it a try. And if I mess things up, you can always get rid of me afterwards. ¯_(ツ)_/¯

@poVoq
Copy link
Copy Markdown
Collaborator

poVoq commented Mar 23, 2026

Well, we don't really have other volunteers and I doubt the original library will be fixed when Mattermost changes anything.

@poVoq
Copy link
Copy Markdown
Collaborator

poVoq commented Mar 23, 2026

Anyways, if you agree to maintain the library and bridge, please change it in this PR.

Also make sure to add yourself as a maintainer to the in-repo documentation, and update the documentation, example config and changelog.

Thanks a lot 👍

@AlexanderShK
Copy link
Copy Markdown
Author

Understood. Could you please fork matterclient under the matterbridge-org organization? I could then open the necessary pull request there and update this patch to be based on it.

@poVoq
Copy link
Copy Markdown
Collaborator

poVoq commented Mar 24, 2026

https://github.com/matterbridge-org/matterclient

Please also add a readme with the PR.

@AlexanderShK
Copy link
Copy Markdown
Author

AlexanderShK commented Mar 25, 2026

Created MR in matterclient repo. Also, before moving this PR from the Draft, will need to create the first tag/release of matterclient (v0.0.1?) after #1 get merged.

@poVoq
Copy link
Copy Markdown
Collaborator

poVoq commented Mar 25, 2026

Great. I added you as a member with write access to that repo. If that isn't sufficient to tag a release, please let me know and I will upgrade it to management permissions.

@AlexanderShK AlexanderShK marked this pull request as ready for review March 25, 2026 12:00
@AlexanderShK AlexanderShK changed the title [Draft] Added support for FullName, FirstName, LastName, and UserName for Mattermost bridge [Added] support for FullName, FirstName, LastName, and UserName for Mattermost bridge Mar 25, 2026
@AlexanderShK
Copy link
Copy Markdown
Author

Go really dislikes if-else, switching it to a switch once I get a spare minute

Rewritten to a more preferable style for GO
@AlexanderShK
Copy link
Copy Markdown
Author

Fixed

@selfhoster1312
Copy link
Copy Markdown
Collaborator

Hello, thanks for the contribution!

Just wondering if so many binary settings is the correct approach for string formatting the nick. Maybe we could add a LocalNickFormat setting which could use those new values? Other opinions welcome :)

@AlexanderShK
Copy link
Copy Markdown
Author

Actually, that sounds like a good idea. Originally, I did it this way because useUserName already existed and was being used for Matrix and Discord. Telegram already had its own useFirstName, and Mattermost had UseNickName. So I figured this was a somewhat established pattern across the different platforms in the config, I decided to keep things coherent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants